set(INCLUDE_DIRS
    ${CMAKE_CURRENT_SOURCE_DIR}/.
    ${CMAKE_CURRENT_SOURCE_DIR}/../include
    ${CMAKE_CURRENT_SOURCE_DIR}/../../include
    ${CMAKE_SOURCE_DIR}/build/unit-testing/
    ${CMAKE_SOURCE_DIR}/build/unit-testing/src/
)

set(DEP_LIBS
    check
    link_list
    check_interface
    pthread
)

set(DEP_LIBS_DIR
    ${CMAKE_SOURCE_DIR}/build/unit-testing/src/
    ${CMAKE_SOURCE_DIR}/build/link_list/src/
    ${CMAKE_SOURCE_DIR}/build/link_list/test/
)

set(SRC
    check_add.c
    check_init.c
    check_clean.c
    check_delete_first.c
    check_interface.c
)

set(TEST_LIB_NAME
    check_interface
)

link_directories(${DEP_LIBS_DIR})
include_directories(${INCLUDE_DIRS})

add_library(${TEST_LIB_NAME} SHARED ${SRC})
target_link_libraries(${TEST_LIB_NAME} link_list)

add_executable(interface_test check_interface.c)
target_link_libraries(interface_test ${DEP_LIBS} check_interface)